<input type="hidden" name="reply_id" value="{$reply['id']}" />
{if $reply['id']}
<div class="panel panel-default">
    <div class="panel-heading">
        活动数据
    </div>
	<div class="panel-body">
	<div class="row-fluid">
    	<div class="span8 control-group">
			<a class="btn btn-default" href="{php echo $this->createWebUrl('fanslist',array('name'=>'bigwheel', 'rid' => $rid));}">参与粉丝</a>
			<a class="btn btn-default" href="{php echo $this->createWebUrl('awardlist',array('rid' => $rid));}">中奖名单</a>
			<a class="btn btn-default" href="{php echo $this->createWebUrl('awarddui',array('rid' => $rid));}">兑奖统计</a>
			{if $stonefish_branch}<a class="btn btn-default" href="{php echo $this->createWebUrl('branch',array('rid' => $rid));}">商家赠送项</a>{/if}
        </div>
    </div>
    </div>
</div>
{/if}
<div class="panel panel-default">
    <div class="panel-heading">
        活动设置
    </div>
    <div class="panel-body">        
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动名称</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" id="title" class="form-control" placeholder="" name="title" value="{$reply['title']}">
            </div>
        </div>
 		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('start_picurl',$reply['start_picurl']);}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动说明</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='description' name="description" class="form-control" cols="60">{$reply['description']}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动时间</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_daterange('datelimit', array('start'=>date('Y-m-d H:i',$reply['starttime']),'end'=>date('Y-m-d H:i',$reply['endtime'])), true)}
            </div>
        </div>        
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">版权信息</label>
            <div class="col-sm-9 col-xs-12">
                    <input type="text" id="copyright" class="form-control" placeholder="" name="copyright" value="{$reply['copyright']}">
		<div class="help-block">版权信息，如果不填写，默认为公众号名称！</div>
            </div>
        </div>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        活动结束设置
    </div>
    <div class="panel-body">
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 结束标题</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" id="end_theme" class="form-control" placeholder="" name="end_theme" value="{$reply['end_theme']}">
            </div>
        </div>
 		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 结束图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('end_picurl',$reply['end_picurl']);}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 结束说明</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='end_instruction' name="end_instruction" class="form-control" cols="60">{$reply['end_instruction']}</textarea>
            </div>
        </div>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        活动详细设置
    </div>
    <div class="panel-body">        
		<div class="form-group" id="award_times">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">选择种子</label>
            <div class="col-sm-9 col-xs-6">
               	<select name="seedid" class="form-control">
					{loop $seed $seedid}
					<option value="{$seedid['id']}" {if $seedid['id'] == $reply['seedid']}selected{/if}>{$seedid['seedname']}</option>
					{/loop}
				</select>
            </div>
        </div>
		<div class="form-group" id="award_times">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">抽奖开始级别</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<span class="input-group-addon">植物生长到</span>
					<select name="award_times" class="form-control">
						<option value="2" {if 2 == $reply['award_times']}selected{/if}>发芽期7次</option>
						<option value="3" {if 3 == $reply['award_times']}selected{/if}>生长期6次</option>
						<option value="4" {if 4 == $reply['award_times']}selected{/if}>发枝期5次</option>
						<option value="5" {if 5 == $reply['award_times']}selected{/if}>繁荣期4次</option>
						<option value="6" {if 6 == $reply['award_times']}selected{/if}>开花期3次</option>
						<option value="7" {if 7 == $reply['award_times']}selected{/if}>结果期2次</option>
						<option value="8" {if 8 == $reply['award_times']}selected{/if}>成熟期1次</option>
					</select>
					<span class="input-group-addon">抽奖机会!</span>
				</div>
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">抽奖类型</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<label for="award_type0" class="radio-inline"><input type="radio" name="award_type" value="0" id="award_type0" {if empty($reply) || $reply['award_type'] == 0}checked="true"{/if}/> 越级忽略</label>&nbsp;&nbsp;&nbsp;
					<label for="award_type1" class="radio-inline"><input type="radio" name="award_type" value="1" id="award_type1" {if $reply['award_type'] == 1}checked="true"{/if}/> 越级保留</label>
				</div>
				<div class="help-block">中间生长级别没有查看时是否保留抽奖的机会</div>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">摇奖说明</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='ticket_information' name="ticket_information" class="form-control" cols="60">{$reply['ticket_information']}</textarea>
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖方式</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<label for="tickettype0" class="radio-inline"><input type="radio" name="tickettype" value="1" id="tickettype0" {if $reply['tickettype'] == 1}checked="true"{/if}/> 后台兑奖</label>&nbsp;&nbsp;&nbsp;
					<label for="tickettype1" class="radio-inline"><input type="radio" name="tickettype" value="2" id="tickettype1" {if $reply['tickettype'] == 2}checked="true"{/if}/> 店员兑奖</label>&nbsp;&nbsp;&nbsp;
					{if $stonefish_branch}<label for="tickettype2" class="radio-inline"><input type="radio" name="tickettype" value="3" id="tickettype2" {if $reply['tickettype'] == 3}checked="true"{/if}/> 商家网点兑奖</label>{/if}
				</div>				
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖类型</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<label for="duijiangtype1" class="radio-inline"><input type="radio" name="duijiangtype" value="1" id="duijiangtype1" {if $reply['duijiangtype'] == 1}checked="true"{/if}/> 抽中立即减少库存</label>&nbsp;&nbsp;&nbsp;
					<label for="duijiangtype2" class="radio-inline"><input type="radio" name="duijiangtype" value="2" id="duijiangtype2" {if $reply['duijiangtype'] == 2}checked="true"{/if}/> 兑奖后才减少库存</label>
				</div>
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">领取种子选项</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<label for="opportunity1" class="radio-inline"><input type="radio" name="opportunity" value="0" id="opportunity1" {if empty($reply) || $reply['opportunity'] == 0}checked="true"{/if} onclick="{if $stonefish_branch}$('#opportunity_text').hide();{/if}$('#number_times').show();$('#credit').hide();"/> 活动设置</label>&nbsp;&nbsp;&nbsp;
					{if $stonefish_branch}<label for="opportunity2" class="radio-inline"><input type="radio" name="opportunity" value="1" id="opportunity2" {if !empty($reply) && $reply['opportunity'] == 1}checked="true"{/if} onclick="$('#opportunity_text').show();$('#number_times').hide();$('#credit').hide();"/> 商户赠送</label>&nbsp;&nbsp;&nbsp;{/if}
					<label for="opportunity3" class="radio-inline"><input type="radio" name="opportunity" value="2" id="opportunity3" {if !empty($reply) && $reply['opportunity'] == 2}checked="true"{/if} onclick="{if $stonefish_branch}$('#opportunity_text').hide();{/if}$('#number_times').hide();$('#credit').show();"/> 积分购买</label>
				</div>				
            </div>
        </div>
		{if $stonefish_branch}
		<div class="form-group" id="opportunity_text"{if !empty($reply) && $reply['opportunity'] == 1} style="display:block"{else} style="display:none"{/if}>
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家赠送</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='opportunity_txt' name="opportunity_txt" class="form-control richtext2" cols="60">{$reply['opportunity_txt']}</textarea>
            </div>
        </div>
        {/if}		
		<div class="form-group" id="credit"{if !empty($reply) && $reply['opportunity'] == 2} style="display:block"{else} style="display:none"{/if}>
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">积分购买</label>
            <div class="col-sm-9 col-xs-6">
               	<div class="input-group">
					<span class="input-group-addon">每</span>
					<input type="text" class="form-control" name="credit_times" id="credit_times" value="{$reply['credit_times']}" />
					<span class="input-group-addon" style="border-left:0px;border-right:0px;">个</span>
					<select name="credit_type" class="form-control">
						{loop $creditnames $key $credit}
						<option value="{$key}" {if $key == $reply['credit_type']}selected{/if}>{$credit}</option>
						{/loop}
					</select>
					<span class="input-group-addon">购买种子</span>
				</div>
            </div>
        </div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">助力限制类型</label>
			<div class="col-sm-9 col-xs-12">
				<label for="limitType0" class="radio-inline"><input type="radio" id="limitType0" name="limittype" value="0" {if $reply['limittype'] == 0}checked="checked"{/if} onclick="$('#totallimit').hide();">限制一次</label>&nbsp;&nbsp;&nbsp;
				<label for="limitType1" class="radio-inline"><input type="radio" id="limitType1" name="limittype" value="1" {if $reply['limittype'] == 1}checked="checked"{/if} onclick="$('#totallimit').show();">每天一次</label>
			</div>
		</div>
		<div class="form-group" id="totallimit"{if $reply['limittype'] == 0} style="display:none"{/if}>
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">每个好友总助力次数限制</label>
			<div class="col-sm-9 col-xs-12">
				<div class="input-group">
					<span class="input-group-addon">每个好友最多助力</span>
					<input type="text" name="totallimit" class="form-control" value="{$reply['totallimit']}" />
					<span class="input-group-addon">次</span>
				</div>
			</div>
		</div>		
	</div>
</div>
<div class="panel panel-default" id="award">
	<div class="panel-heading">
		奖品信息
	</div>
	<div class="panel-body">
		{if $prize}
			{loop $prize $item}
			<div>
			<input type="hidden" name="prize_id[{$item['id']}]" value="{$item['id']}" />
            <div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品类别</label>
                <div class="col-sm-3">
                    <input class="form-control" type="text" value="{$item['prizetype']}" name="prizetype[{$item['id']}]">
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">奖品名称</label>
                <div class="col-sm-4">
                    <input class="form-control" type="text" value="{$item['prizename']}" name="prizename[{$item['id']}]">
                </div>
            </div>			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品数量</label>
                <div class="col-sm-3">
                    <div class="input-group">
                        <input class="form-control" type="text" value="{$item['prizetotal']}" name="prizetotal[{$item['id']}]">
                        <span class="input-group-addon">份</span>
                    </div>
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">中奖概率</label>
                <div class="col-sm-4">
                    <div class="input-group">
                        <input class="form-control" type="text" value="{$item['prizepro']}" name="prizepro[{$item['id']}]">
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">邀请级别</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <span class="input-group-addon">植物生长级别为</span>
						<select name="sharenum[{$item['id']}]" class="form-control">
						    <option value="2" {if 2 == $item['sharenum']}selected{/if}>发芽期</option>
							<option value="3" {if 3 == $item['sharenum']}selected{/if}>生长期</option>
							<option value="4" {if 4 == $item['sharenum']}selected{/if}>发枝期</option>
							<option value="5" {if 5 == $item['sharenum']}selected{/if}>繁荣期</option>
							<option value="6" {if 6 == $item['sharenum']}selected{/if}>开花期</option>
							<option value="7" {if 7 == $item['sharenum']}selected{/if}>结果期</option>
							<option value="8" {if 8 == $item['sharenum']}selected{/if}>成熟期</option>							
					    </select>
						<span class="input-group-addon">时可参与摇一摇抽奖</span>
                    </div>					
                </div>				
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品图片</label>
                <div class="col-sm-9">
				    {php echo tpl_form_field_image('prizepic['.$item['id'].']',$item['prizepic']);}
					<div class="help-block">奖品显示图片 图片大小418px X 418px</div>
				</div>
            </div>
			<hr/>
			</div>
			{/loop}		
		{/if}
		<div id="jiangpin" style="display: none">
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品类别</label>
                <div class="col-sm-3">
                    <input class="form-control" type="text" value="" name="prizetype_new[]">
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">奖品名称</label>
                <div class="col-sm-4">
                    <input class="form-control" type="text" value="" name="prizename_new[]">
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">奖品数量</label>
                <div class="col-sm-3">
                    <div class="input-group">
                        <input class="form-control" type="text" value="" name="prizetotal_new[]">
                        <span class="input-group-addon">份</span>
                    </div>
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">中奖概率</label>
                <div class="col-sm-4">
                    <div class="input-group">
                        <input class="form-control" type="text" value="" name="prizepro_new[]">
                        <span class="input-group-addon">%</span>
                    </div>
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">邀请级别</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <span class="input-group-addon">植物生长级别为</span>
						<select name="sharenum_new[]" class="form-control">
						    <option value="2">发芽期</option>
							<option value="3">生长期</option>
							<option value="4">发枝期</option>
							<option value="5">繁荣期</option>
							<option value="6">开花期</option>
							<option value="7">结果期</option>
							<option value="8">成熟期</option>							
					    </select>
						<span class="input-group-addon">时可参与摇一摇抽奖</span>
                    </div>					
                </div>				
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品图片</label>
                <div class="col-sm-9">
					{php echo tpl_form_field_image('prizepic_new[]','');}
					<div class="help-block">奖品显示图片 图片大小418px X 418px</div>
				</div>
            </div>
		</div>
		{if empty($prize)}
		<div>
            <div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品类别</label>
                <div class="col-sm-3">
                    <input class="form-control" type="text" value="" name="prizetype_new[]">
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">奖品名称</label>
                <div class="col-sm-4">
                    <input class="form-control" type="text" value="" name="prizename_new[]">
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">奖品数量</label>
                <div class="col-sm-3">
                    <div class="input-group">
                        <input class="form-control" type="text" value="" name="prizetotal_new[]">
                        <span class="input-group-addon">份</span>
                    </div>
                </div>
				<label class="col-xs-12 col-sm-2 col-md-2 control-label">中奖概率</label>
                <div class="col-sm-4">
                    <div class="input-group">
                        <input class="form-control" type="text" value="" name="prizepro_new[]">
                        <span class="input-group-addon">%</span>
                    </div>
                </div>							
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">邀请级别</label>
                <div class="col-sm-9">
                    <div class="input-group">
                        <span class="input-group-addon">植物生长级别为</span>
						<select name="sharenum_new[]" class="form-control">
						    <option value="2">发芽期</option>
							<option value="3">生长期</option>
							<option value="4">发枝期</option>
							<option value="5">繁荣期</option>
							<option value="6">开花期</option>
							<option value="7">结果期</option>
							<option value="8">成熟期</option>
					    </select>
						<span class="input-group-addon">时可参与摇一摇抽奖</span>
                    </div>					
                </div>				
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品图片</label>
                <div class="col-sm-9">
					{php echo tpl_form_field_image('prizepic_new[]','');}
					<div class="help-block">奖品显示图片 图片大小418px X 418px</div>
				</div>
            </div>
			<hr/>
		</div>
		{/if}
		<span id="award_insert_flag" style="display: none"></span>
		<div class="form-group">
		    <div class="col-sm-5"></div>
			<div class="col-sm-7">
				<button id="btn_add_award" type="button" class="btn btn-warning">
					<span class="glyphicon glyphicon-plus"></span> 添加奖品
				</button>
			</div>
		</div>
	</div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        活动样式设置
    </div>
    <div class="panel-body">
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动页顶部广告图</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('adpic',$reply['adpic']);}
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 广告图链接</label>
            <div class="col-sm-9 col-xs-12">
				{php echo tpl_form_field_link('adpicurl',$reply['adpicurl']);}
				<div class="help-block">广告图链接必需填写完整的URL地址如：http://www.baidu.com</div>
            </div>
        </div>		
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        活动显示设置
    </div>
    <div class="panel-body">
        <div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页滚动中奖人数</label>
            <div class="col-sm-9 col-xs-6">
				<div class="input-group">
					<span class="input-group-addon">首页显示</span>
					<input type="text" class="form-control" name="awardnum" value="{$reply['awardnum']}" />
					<span class="input-group-addon">位中奖粉丝 滚动显示  0为不显示中奖信息</span>
				</div>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>显示奖品数量</label>
            <div class="col-sm-9 col-xs-12">
               	<label class="radio-inline">
                	<input type="radio" name="show_num" value="0" {if $reply['show_num'] == 0} checked="checked"{/if}/>不显示
                </label>
                <label class="radio-inline">
                	<input type="radio" name="show_num" value="1" {if $reply['show_num'] == 1} checked="checked"{/if}/>仅显示奖品
                </label>
				<label class="radio-inline">
                	<input type="radio" name="show_num" value="2" {if $reply['show_num'] == 2} checked="checked"{/if}/>显示奖品以及数量
                </label>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">奖品详细介绍</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style=" height:200px;" id='award_info' name="award_info" class="form-control richtextinfo">{$reply['award_info']}</textarea>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 秒显广告时间</label>
            <div class="col-sm-9 col-xs-12">
               	<div class="input-group">
					<span class="input-group-addon">首页显示</span>
					<input type="text" class="form-control" name="homepictime" value="{$reply['homepictime']}" />
					<span class="input-group-addon">秒广告图    0秒为不显示</span>
				</div>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">秒显广告图</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('homepic',$reply['homepic']);}
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 虚拟人数显示</label>
            <div class="col-sm-9 col-xs-12">
               	<div class="input-group">
					<span class="input-group-addon">首页显示</span>
					<input type="text" class="form-control" name="xuninum" value="{$reply['xuninum']}" />
					<span class="input-group-addon">位虚拟人数+真实参与人数　此数值随下面设置自动变化</span>
				</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 虚拟人数设置</label>
            <div class="col-sm-9 col-xs-12">
               	<div class="input-group">
					<span class="input-group-addon">每次间隔</span>
                    <input type="text" class="form-control" name="xuninumtime" id="xuninumtime" value="{$reply['xuninumtime']}" />
                    <span class="input-group-addon" style="border-left:0px;border-right:0px;">秒　系统自动增加</span>
					<input type="text" class="form-control" name="xuninuminitial" id="xuninuminitial" value="{$reply['xuninuminitial']}" />
					<span class="input-group-addon" style="border-left:0px;border-right:0px;">至</span>
					<input type="text" class="form-control" name="xuninumending" id="xuninumending" value="{$reply['xuninumending']}" />
					<span class="input-group-addon">名虚拟人参与本活动</span>
				</div>
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖输入项提示词</label>
            <div class="col-sm-9 col-xs-6">
				<input type="text" class="form-control" name="ticketinfo" value="{$reply['ticketinfo']}" />
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 兑奖输入参数项</label>
            <div class="col-sm-9 col-xs-12">
				<div style="border:1px #eee dashed; padding:10px;background:#F5F5F5;">					
               	    <label for="isrealname" class="checkbox-inline"><input id="isrealname" type="checkbox" name="isrealname" value="1" {if $reply['isrealname'] == 1}checked="checked"{/if}> 姓名</label>
				    <label for="ismobile" class="checkbox-inline"><input id="ismobile" type="checkbox" name="ismobile" value="1" {if $reply['ismobile'] == 1}checked="checked"{/if}> 手机</label>
				    <label for="isqq" class="checkbox-inline"><input id="isqq" type="checkbox" name="isqq" value="1" {if $reply['isqq'] == 1}checked="checked"{/if}> QQ号</label>
				    <label for="isemail" class="checkbox-inline"><input id="isemail" type="checkbox" name="isemail" value="1" {if $reply['isemail'] == 1}checked="checked"{/if}> 邮箱</label>
				    <label for="isaddress" class="checkbox-inline"><input id="isaddress" type="checkbox" name="isaddress" value="1" {if $reply['isaddress'] == 1}checked="checked"{/if}> 地址</label>
					<label for="isgender" class="checkbox-inline"><input id="isgender" type="checkbox" name="isgender" value="1" {if $reply['isgender'] == 1}checked="checked"{/if}> 性别</label>
					<label for="istelephone" class="checkbox-inline"><input id="istelephone" type="checkbox" name="istelephone" value="1" {if $reply['istelephone'] == 1}checked="checked"{/if}> 固话</label>
					<label for="isidcard" class="checkbox-inline"><input id="isidcard" type="checkbox" name="isidcard" value="1" {if $reply['isidcard'] == 1}checked="checked"{/if}> 证件</label>
					<label for="iscompany" class="checkbox-inline"><input id="iscompany" type="checkbox" name="iscompany" value="1" {if $reply['iscompany'] == 1}checked="checked"{/if}> 公司</label>
					<label for="isoccupation" class="checkbox-inline"><input id="isoccupation" type="checkbox" name="isoccupation" value="1" {if $reply['isoccupation'] == 1}checked="checked"{/if}> 职业</label>
					<label for="isposition" class="checkbox-inline"><input id="isposition" type="checkbox" name="isposition" value="1" {if $reply['isposition'] == 1}checked="checked"{/if}> 职位</label>
					</div>
					<div class="help-block">必需选择一个参数兑奖 活动开启后最好不要修改 请谨慎选择 重命显示请修改下面的参数</div>
            </div>
        </div>
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖输入参数重命名</label>
            <div class="col-sm-9 col-xs-6">
				<input type="text" class="form-control" name="isfansname" value="{$reply['isfansname']}" />
				<div class="help-block">与上面的参数一一对应，请直接修改不要改变','这个字符</div>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 兑奖输入参数同步</label>
            <div class="col-sm-9 col-xs-12">
				<label for="isfans_0" class="radio-inline"><input id="isfans_0" type="radio" name="isfans" value="0" {if $reply['isfans'] == 0}checked="checked"{/if}> 参数项只保留本模块下</label>
				<label for="isfans_1" class="radio-inline"><input id="isfans_1" type="radio" name="isfans" value="1"  {if $reply['isfans'] == 1}checked="checked"{/if}> 参数项同步更新至官方会员信息表中</label>
            </div>
        </div>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        {if $ids_num>1}多子公众号分享设置{else}分享设置{/if}
    </div>
    <div class="panel-body table-responsive">
		{if $ids_num>1}
		<!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            {loop $ids $idsname}
			<li role="presentation"{if $idsname==$one} class="active"{/if}>
                <a href="#acid{$idsname}" role="tab" data-toggle="tab">{$acid_arr[$idsname]['name']}</a>
            </li>
			{/loop}
        </ul>
		<!-- Tab panes -->
		{/if}
        <div class="tab-content">
			{loop $share $shares}
			<input type="hidden" name="acid_{$shares['acid']}" value="{$shares['id']}"/>
            <div role="tabpanel" class="tab-pane{if $shares['acid']==$one} active{/if}" id="acid{$shares['acid']}">
			{if $ids_num>1}
			<div class="form-group">
 			    <label class="col-xs-12 col-sm-3 col-md-2 control-label">默认显示分享信息</label>
                <div class="col-sm-9 col-xs-6">
               	    <div class="input-group">
					    <label for="share_acid{$shares['acid']}" class="radio-inline"><input type="radio" name="share_acid" value="{$shares['acid']}" id="share_acid{$shares['acid']}" {if $reply['share_acid'] == $shares['acid']}checked="true"{/if} /> 设置 <strong>{$acid_arr[$shares['acid']]['name']}</strong> 为默认分享显示 {if $acid_arr[$shares['acid']]['level']==2} <strong><font color=red>推荐</font></strong>{/if}</label>
				    </div>				
                </div>
		    </div>
			{else}
			<input type="hidden" name="share_acid" value="{$reply['share_acid']}"/>
			{/if}
		    <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">引导关注页</label>
                <div class="col-sm-9 col-xs-12">
               	    <input type="text" id="share_url_{$shares['acid']}" class="form-control" name="share_url_{$shares['acid']}" value="{$shares['share_url']}">
                    <div class="help-block">引导关注页的链接! 推荐用微信平台的素材库，转成短地址。<a target="_blank" href="http://www.dwz.cn/">短网址转换</a></div>
                </div>
            </div>			
		    <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
                <div class="col-sm-9 col-xs-12">
               	    <input type="text" id="share_title_{$shares['acid']}" class="form-control" name="share_title_{$shares['acid']}" value="{$shares['share_title']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享描述</label>
                <div class="col-sm-9 col-xs-12">
     	            <textarea style="height:60px;" id="share_desc_{$shares['acid']}" name="share_desc_{$shares['acid']}" class="form-control" cols="60">{$shares['share_desc']}</textarea>
				    <span class="help-block">分享标题以及分享描述可用变量<br/><span style='color:red'>#参与人数# </span>所有参与活动的总数 + 虚拟人数<br/><span style='color:red'>#参与人# </span>分享人填写兑奖的真实姓名<br/><span style='color:red'>#奖品# </span>分享人所中的最大奖品名称，没有中奖则不显示</span>
                </div>
            </div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">参与规则</label>
                <div class="col-sm-9 col-xs-12">
     	            <textarea style="height:200px;" id="share_txt_{$shares['acid']}" name="share_txt_{$shares['acid']}" class="form-control richtext_{$shares['acid']}" cols="60">{$shares['share_txt']}</textarea>
                </div>
            </div>
		    <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图</label>
                <div class="col-sm-9 col-xs-12">
                   	{php echo tpl_form_field_image('share_picurl_'.$shares['acid'],$shares['share_picurl']);}
                </div>
            </div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享弹出提示图</label>
                <div class="col-sm-9 col-xs-12">
                   	{php echo tpl_form_field_image('share_pic_'.$shares['acid'],$shares['share_pic']);}
                </div>
            </div>
			<!--
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享成功提示语</label>
                <div class="col-sm-9 col-xs-6">
					<input type="text" class="form-control" name="share_confirm_{$shares['acid']}" value="{$shares['share_confirm']}" />
                </div>
            </div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享失败提示语</label>
                <div class="col-sm-9 col-xs-6">
					<input type="text" class="form-control" name="share_fail_{$shares['acid']}" value="{$shares['share_fail']}" />		    
                </div>
            </div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享中途取消提示语</label>
                <div class="col-sm-9 col-xs-6">
					<input type="text" class="form-control" name="share_cancel_{$shares['acid']}" value="{$shares['share_cancel']}" />		    
                </div>
            </div>
			-->
			</div>
			{/loop}
		</div>
	</div>	
</div>
<script type="text/javascript">
<!--
	function validateReplyForm(formobj, jq, underscore, util, $scope, $http) {
		if (!formobj['title'].value) {
			util.message('请输入活动名称');
			return false;
		}		
	}
	
	require(['jquery', 'util'], function($, u){
		$(function(){
			u.editor($('.richtextinfo')[0]);
			{if $stonefish_branch}u.editor($('.richtext2')[0]);{/if}
			{loop $ids $idsname}
			u.editor($('.richtext_{$idsname}')[0]);
			{/loop}
		});
    });
	$('#btn_add_award').bind('click', function(){
		var content = '<div>';
		content += $("#jiangpin").html();
		content += '<div class="form-group">';
		content += '<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>';
		content += '<div class="col-sm-9">';
		content += '<button type="button" class="btn btn-danger btn_del_award">删除</button>';
		content += '</div>';
		content += '</div>';
		content += '<hr/>';
		content += '</div>';
		$('#award_insert_flag').before(content);
		$('.btn_del_award').bind('click', function(){
			var obj = $(this).parent().parent().parent();
			obj.slideUp(300, function() {
				obj.remove();
			});
		});
	});
//-->
</script>